#ifndef _PROJECA
#define _PROJECA

#include "datetime_period.hpp"
#include "file_list.hpp"

class projeca
{
  public:

	// total travelled kilometers in the period
	static float travelling(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), int _car_id = 1) ;

	// estimated fuel consumption for travelling in the period
	static float travelling_estimated_fuel_consumption_physical(boost::gregorian::date _first_date, boost::gregorian::date _last_date = boost::gregorian::day_clock::local_day(), int car_id =1, bool _include_last_date =true);

	// estimated travelling cost for fuel consumption in the period
	static float travelling_estimated_fuel_consumption_financial(boost::gregorian::date _first_date, boost::gregorian::date _last_date = boost::gregorian::day_clock::local_day(), int _car_id =1, bool _include_last_date =true);

	// total fuel burned in the period (in liters)
	static float fuel_physical(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), int _car_id = 1);

	// total amount of money spent for fuel in the period
	static float fuel_financial(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), int _car_id = 1);

 	// mean fuel consumption in liter/km
    static float mean_fuel_consumption(boost::gregorian::date _first_date, boost::gregorian::date _last_date = boost::gregorian::day_clock::local_day(), int _car_id = 1, bool _include_last_date = true);

    // mean distance in km/liter
    static float mean_fuel_distance(boost::gregorian::date _first_date, boost::gregorian::date _last_date= boost::gregorian::day_clock::local_day(), int _car_id = 1, bool _include_last_date = true);

	// gross fuel refund in the specified period
	static float travelling_fuel_refund(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), int _car_id =1);

	// estimated net fuel refund in the specified period = gross fuel refund minus total estimated fuel consumption for business travelling
	static float travelling_estimated_net_fuel_refund(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), int _car_id =1);

	// estimated fuel consumption in a specified day
    static float travelling_estimated_fuel_consumption_currency(boost::gregorian::date _date, int _car_id = 1, bool _include_last_date = true);


	// toDO kilometer_report(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), bool _include_last_date = true, int _empl_id=1);
	// auto, targa, cilindrata, proprieta', alimentazione
	// data, progetto, chilometri, tariffa, importo, percorso, 
	// totale_km, totale_rimborso

	static float kilometer_report(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), bool _include_last_date = true, int _plate_id=1);

	static float kilometer_report_in_period(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), bool _include_last_date = true, int _plate_id=1);

	static std::pair<float, float> const report_expenses(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), bool _include_last_date = true, int _empl_id=1);

// 	toDo - EXPENSES

//	static void expense_report(date _from_date, date _to_date=day_clock::local_day(), int _empl_id=1);
	// data, progetto, 
	//{travelling_allowance_amount, ticket_restaurant_amount, no_refund_amount, toll_amount, transport_services_amount, meal_amount, hotel_amount, other_amount }

	// indennita' di trasferta
//  static float travelling_allowance_amount(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), bool _include_last_date = true, int _empl_id=1);

// static float ticket_restaurant_amount(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), bool _include_last_date = true, int _empl_id=1);

	// no refund of expenses
	// static float no_refund_amount(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), bool _include_last_date = true, int _empl_id=1);

	// pedaggi
	//static float toll_amount(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), bool _include_last_date = true, int _empl_id=1);

	// altri trasporti
	// static float transport_services_amount(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), bool _include_last_date = true, int _empl_id=1);

	// pasti
	// static float meal_amount(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), bool _include_last_date = true, int _empl_id=1);

	// static float hotel_amount(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), bool _include_last_date = true, int _empl_id=1);

	// altre spese
	// static float other_amount(boost::gregorian::date _from_date, boost::gregorian::date _to_date = boost::gregorian::day_clock::local_day(), bool _include_last_date = true, int _empl_id=1);


  protected:


  private:
	static boost::gregorian::date const init_date(boost::gregorian::date _date);
};


#endif
